package com.ztc.ZtcClassesSite.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztc.ZtcClassesSite.bean.ZtcClassesSite;
import com.ztc.ZtcClassesSite.dao.ZtcClassesSiteDao;
@Service("ZtcClassesSite")
public class ZtcClassesSiteManager{
    @Autowired
    ZtcClassesSiteDao ztcClassesSiteDao;
	public String save(ZtcClassesSite ztcSite)  {
		return ztcClassesSiteDao.save(ztcSite);
	}
	
    public List<ZtcClassesSite> getAll(){
        return ztcClassesSiteDao.getAllZtcClassesSites();
    }

    public List<ZtcClassesSite> searchInfoEquals(ZtcClassesSite ztcSite) {
		return ztcClassesSiteDao.searchInfoEquals(ztcSite);
	}

    /**
     * 根据名称，城市，负责人电话查询站点
     * @param name 名称
     * @param areaCity 城市
     * @param managerPhone 负责人电话
     * @return 站点信息集合
     */
    public List<ZtcClassesSite> searchInfoLikes(String name,String areaCity,String managerPhone){
        List<ZtcClassesSite> list= ztcClassesSiteDao.searchInfoLikes(name, areaCity,managerPhone);
        return list;
    }

    /**
     * 根据站点id，班次id，修改人id删除站点
     * @param id 站点id
     * @param ztcClassesId 班次id
     * @param modifyUserId 修改人id
     * @return 返回操作结果：0.删除失败1.删除成功
     */
    public String delete(String id, String ztcClassesId,String modifyUserId){
        return ztcClassesSiteDao.delete(id, ztcClassesId,modifyUserId);
    }
    
    public String update(ZtcClassesSite ztcClassesSite) {
    	return ztcClassesSiteDao.update(ztcClassesSite);
    }
}
